jQuery(function ($) {
    "use strict"

    window.setTimeout(function() {
        var $channelTree = $.jstree.reference('#channel-tree');
        console.log($channelTree);
    }, 0);
    /*
    var $channelTree = $('#channel-tree').jstree({
        "core": {
            "animation": 0,
            "check_callback": true
        },
        "types": {
            "#": {
                "max_children": 1,
                "max_depth": 4,
                "valid_children": ["root"]
            },
            "root": {
                "valid_children": ["default"]
            },
            "default": {
                "valid_children": ["default"]
            }
        },
        "plugins": [
            "dnd", "types", "state", "wholerow"
        ]
    });

    var $contentRenderContainer = $('#content-reader-container');

    $channelTree.on('select_node.jstree', function (e, params) {
        var node = params['node'];
        //window.location.href = node.a_attr.href;
        return;
        $.ajax({
            type: 'get',
            url: node.a_attr.href
        }).done(function(data) {
            $contentRenderContainer.html(data);
        }).always(function() {

        });
    })*/
});
